import {createContext} from 'react';
import {TableColumn} from "./types";

interface TableContextProps {
    data: any[];
    normalColumns: TableColumn[];
    fixedColumns: TableColumn[];
    color: string;
    borderBottomWidth: number;
    borderColor: string;
    cellDefaultWidth?: number;
    fontSize: number;
    headerHeight: number;
    headerBgColor: string;
    headerFontSize: number;
}

export const TableContext = createContext<TableContextProps>({
    data: [],
    normalColumns: [],
    fixedColumns: [],
    color: "",
    borderBottomWidth: 0,
    borderColor: "",
    fontSize: 0,
    cellDefaultWidth: 0,
    headerBgColor: "",
    headerFontSize: 0,
    headerHeight: 0
});